package liangtWorkSpace.proxy.reflect;

import java.lang.reflect.Proxy;

/**
 * @ClassName MyProxFactory
 * @Description : 功能说明
 * @Author : LiangT
 * @Date : 2020/4/8 21:35
 */
public class MyProxFactory {
    public static Object getProxy(Object object){
        MyInvocationHandle handle = new MyInvocationHandle();
        handle.setTraget(object);
        Object proxy = Proxy.newProxyInstance(object.getClass().getClassLoader(),object.getClass().getInterfaces(),handle);
        return proxy;
    }
}
